<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			window.onload = function(){
				// 打印100以内的质数
				// 仅仅能被1和自己整除的数
				var count = 0;
				for (var i=2; i<=100; i++){
					for (var j=1; j<=i; j++){
						if (i % j == 0){
							count++;
						}
					}
					
					if(count == 2){
						console.log(i);
					}
					
					count = 0;
				}
			}
		</script>
	</body>
</html>
